package com.mall.util;

import java.util.Locale;
import java.util.concurrent.ThreadLocalRandom;

/**
 * @author:lck
 * @Date 2024/1/16 9:57
 */


public class IdGenerator {

    private static final int MIN_ID = 1000000; // 最小的7位数字
    private static final int MAX_ID = 9999999; // 最大的7位数字

    public static String generateSevenDigitId() {
        long generatorId = ThreadLocalRandom.current().nextInt(MIN_ID, MAX_ID + 1);
        return Long.toString(generatorId);
    }
}
